package com.huidao.ui;

import java.util.Scanner;

import com.huidao.domain.VIPCard;
import com.huidao.service.BuyService;
import com.huidao.service.LoginService;
import com.huidao.service.VipCardService;

public class UserMenu extends Menu {
	private static Scanner sc = new Scanner(System.in);

	@SuppressWarnings("static-access")
	public void show() {
		System.out.println("	--------------欢迎进入三千食客用户操作系统------------");
		super.show();
		System.out.println("会员请输入1，普通用户请输入2");
		int num = sc.nextInt();
		if (num == 1) {
			 VIPCard vipCard = VipCardService.getVipCard();
				new BuyService().buy();
				vipCard.setVipSurplusMoney(vipCard.getVipSurplusMoney()
						- new VipCardService().getTotalPrice());
				vipCard.setVipIntegral(vipCard.getVipIntegral()
						+ (int) (new VipCardService().getTotalPrice()));
		} else {
				new BuyService().buy();
		}
	}
	// public static void main(String[] args) {
	// new UserMenu(). show();
	// }
}
